package com.oanda.blackberry.net;

public class RestException extends Exception {
    int responseCode;
    String reponseMessage;
    String errorMessage;

    public RestException() {
    }

    public RestException(String message) {
        super(message);
    }

    public RestException(String uiMessage, int responseCode, String reponseMessage,
            String errorMessage) {
        super(uiMessage);
        this.responseCode = responseCode;
        this.reponseMessage = reponseMessage;
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() {
        if (this.errorMessage == null) {
            return "";
        }
        return this.errorMessage;
    }

    public String getReponseMessage() {
        if (this.reponseMessage == null) {
            return null;
        }
        return this.reponseMessage;
    }

    public int getResponseCode() {
        return this.responseCode;
    }
}
